package com.ruoyi.student.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.student.mapper.ReCourseClassMapper;
import com.ruoyi.student.domain.ReCourseClass;
import com.ruoyi.student.service.IReCourseClassService;

/**
 * 课程班级关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-10
 */
@Service
public class ReCourseClassServiceImpl implements IReCourseClassService 
{
    @Autowired
    private ReCourseClassMapper reCourseClassMapper;

    /**
     * 查询课程班级关联
     * 
     * @param id 课程班级关联主键
     * @return 课程班级关联
     */
    @Override
    public ReCourseClass selectReCourseClassById(Long id)
    {
        return reCourseClassMapper.selectReCourseClassById(id);
    }
    @Override
    public int removeReCourseClassBycourseIdAndClassId(ReCourseClass reCourseClass){
        return reCourseClassMapper.removeReCourseClassBycourseIdAndClassId(reCourseClass);
    }

    /**
     * 查询课程班级关联列表
     * 
     * @param reCourseClass 课程班级关联
     * @return 课程班级关联
     */
    @Override
    public List<ReCourseClass> selectReCourseClassList(ReCourseClass reCourseClass)
    {
        return reCourseClassMapper.selectReCourseClassList(reCourseClass);
    }

    /**
     * 新增课程班级关联
     * 
     * @param reCourseClass 课程班级关联
     * @return 结果
     */
    @Override
    public int insertReCourseClass(ReCourseClass reCourseClass)
    {
        reCourseClass.setCreateTime(DateUtils.getNowDate());
        return reCourseClassMapper.insertReCourseClass(reCourseClass);
    }

    /**
     * 修改课程班级关联
     * 
     * @param reCourseClass 课程班级关联
     * @return 结果
     */
    @Override
    public int updateReCourseClass(ReCourseClass reCourseClass)
    {
        return reCourseClassMapper.updateReCourseClass(reCourseClass);
    }

    /**
     * 批量删除课程班级关联
     * 
     * @param ids 需要删除的课程班级关联主键
     * @return 结果
     */
    @Override
    public int deleteReCourseClassByIds(Long[] ids)
    {
        return reCourseClassMapper.deleteReCourseClassByIds(ids);
    }

    /**
     * 删除课程班级关联信息
     * 
     * @param id 课程班级关联主键
     * @return 结果
     */
    @Override
    public int deleteReCourseClassById(Long id)
    {
        return reCourseClassMapper.deleteReCourseClassById(id);
    }
}
